package cn.wolfcode.wolf2w.business.controller.admin;

import cn.wolfcode.wolf2w.business.service.IDestinationEsService;
import cn.wolfcode.wolf2w.business.service.INoteEsService;
import cn.wolfcode.wolf2w.business.service.IStrategyEsService;
import cn.wolfcode.wolf2w.business.service.IUserinfoEsService;
import cn.wolfcode.wolf2w.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/search")
public class SearchAdminController {
    @Autowired
    private IStrategyEsService strategyEsService;
    @Autowired
    private INoteEsService noteEsService;
    @Autowired
    private IDestinationEsService destinationEsService;
    @Autowired
    private IUserinfoEsService userinfoEsService;


    @RequestMapping("/esDataInit")
    public R<?> esDateInit() {
        strategyEsService.initStrategyEs();
        userinfoEsService.initUserinfoEs();
        noteEsService.initNoteEs();
        destinationEsService.initDestinationEs();
        return R.ok();
    }
}
